A surveillance camera may operate for 24 hours a day therefore, extremely bright images and extremely dark images are recorded every moment.
The general automatic gain control of the camera often cannot keep up with an extremely large change. Also, when an extremely dark part and bright part are mixed within the same picture, such as an indoor window, it cannot be dealt with by the automatic gain control.
As a conventional image evaluation technique, a method is known that uses a histogram to make a graph using a number of pixels, according to the brightness of each color. This method shows the pixel distribution in the image, it displays the detail of a shadow (the left-hand portion of the histogram), a halftone (the center of the histogram) and the highlight (the right-hand portion of the histogram), and judges whether this detail makes sufficient adjustment to an image for it to be clearly viewed.
For example, an imaging device is described in Prior art 1. This imaging device comprises; an imaging element to output an electrical signal performing photoelectric conversion of an optics image, signal processing means to generate a video signal processing an electrical signal output by said imaging element, a histogram circuit which generates a histogram from a video signal output by the said signal processing means, and an exposure control means using a histogram detected by the said histogram circuit.
An image processing method is described in Prior art 2. This image processing method comprises; a process to generate an image by reading light from a manuscript, a process to make a histogram of the density distribution from the image data, a process to generate a density amendment curve based on a ratio of the number of data of parts which came close to light and shade at both ends of the density distribution corresponding to a number of all parts of the image data, and a process to make a density amendment of the image data using the density amendment curve.
An imaging device is described in Prior art 3. This imaging device includes an imaging means and a gradation correcting means. The imaging means captures an image of a subject, and the image data of the subject is acquired. The gradation correcting means modifies a pixel portion which is a predetermined pixel portion of an imaging image consisting of image data acquired by imaging means and a pixel portion comprising pixels that have a brightness level which is within a predetermined range, so as to harmonize the same.